import request from '@/utils/request'

export function getCompanyInfo(id) {
  return request({
    url: '/company/' + id,
    method: 'get'
  })
}

export function getRoleList() {
  return request({
    url: '/sys/role',
    method: 'get'

  })
}
export function delRole(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'delete'
  })
}
export function addRole(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}
export function editRole(data) {
  return request({
    url: '/sys/role/' + data.id,
    method: 'put',
    data
  })
}
export function getRoleDetail(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'get'
  })
}
export function editAssginPerm(data) {
  return request({
    url: '/sys/role/assignPrem',
    method: 'put',
    data
  })
}
